package provider.client;

import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import org.example.duke.AddNumbersPortType;
import org.example.duke.AddNumbersService;

public class AddNumbersClient {
    public static void main (String[] args) throws MalformedURLException {
    	URL url = new URL("	http://localhost:8080/provider/addnumbers?wsdl");
    	QName qname = new QName("http://duke.example.org", "AddNumbersService");
        AddNumbersPortType port = new AddNumbersService(url,qname).getAddNumbersPort ();

        int number1 = 10;
        int number2 = 20;

        System.out.printf ("Invoking addNumbers(%d, %d)\n", number1, number2);
        int result = port.addNumbers (number1, number2);
        System.out.printf ("The result of adding %d and %d is %d.", number1, number2, result);
    }
}
